How to access string[] in xhtml page

Posted by Kalpana on Stack Overflow See other posts from Stack Overflow or by Kalpana
Published on 2010-05-27T10:29:23Z Indexed on 2010/05/27 10:31 UTC
Read the original article Hit count: 295

Filed under:
|

I am having a simple string array in my bean as

public String[] colors = new String[]{"red", "blue", "green"};

and trying to display these colors from my xhtml as

but I am getting a java.lang.NumberFormatException: For input string: "colors"

java.lang.NumberFormatException: For input string: "colors"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
        at java.lang.Integer.parseInt(Integer.java:447)
        at java.lang.Integer.parseInt(Integer.java:497)
        at javax.el.ListELResolver.coerce(ListELResolver.java:166)
        at javax.el.ListELResolver.getValue(ListELResolver.java:51)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)

© Stack Overflow or respective owner

Related posts about jsf

Related posts about richfaces